package org.hank.compose_yyzs.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import org.hank.compose_yyzs.db.converters.FileTypeConverter
import org.hank.compose_yyzs.db.converters.ProjectTreeTypeConverter

//  ┏┓　　　┏┓
//┏┛┻━━━┛┻┓
//┃　　　　　　　┃
//┃　　　━　　　┃
//┃　┳┛　┗┳　┃
//┃　　　　　　　┃
//┃　　　┻　　　┃
//┃　　　　　　　┃
//┗━┓　　　┏━┛
//    ┃　　　┃                  神兽保佑
//    ┃　　　┃                  永无BUG！
//    ┃　　　┗━━━┓
//    ┃　　　　　　　┣┓
//    ┃　　　　　　　┏┛
//    ┗┓┓┏━┳┓┏┛
//      ┃┫┫　┃┫┫
//      ┗┻┛　┗┻┛
/**
 *@auth: Hank
 *邮箱: cs16xiaoc1@163.com
 *创建时间: 2023/6/25 18:24
 *描述:
 */
@Entity(tableName = "ProjectTreeNode")
data class ProjectTreeNode(
    @PrimaryKey(autoGenerate = false)
    var id: Long,
    @ColumnInfo(name = "parentId", defaultValue = "")
    var parentId: String,
    @ColumnInfo(name = "weight", defaultValue = "")
    var weight: Int,
    @ColumnInfo(name = "name", defaultValue = "")
    var name: String,
    @ColumnInfo(name = "areaName", defaultValue = "")
    var areaName:String?= null,
    @ColumnInfo(name = "isLock", defaultValue = "")
    var isLock: Boolean,
    @ColumnInfo(name = "createTime", defaultValue = "")
    var createTime: String,
    @ColumnInfo(name = "isExpand", defaultValue = "")
    var isExpand :Boolean = false,
    @ColumnInfo(name = "parent", defaultValue = "")
    @TypeConverters(ProjectTreeTypeConverter::class)
    var parent: ProjectTreeNode? = null,
    @ColumnInfo(name = "children")
    @TypeConverters(ProjectTreeTypeConverter::class)
    var children: MutableList<ProjectTreeNode>,
)
